import React,{Component} from 'react';
import ajax from '../../../component/httprequest/Request';
import ReactHtmlParser from 'react-html-parser';
import PropTypes from 'prop-types';
import './hospltalDetails.less';
const prefix = 'hospital_details';
class HospitalDetails extends Component{
    state={
      content:''
    };
    componentWillMount(){
        let page = this.props.page;
        ajax.ajaxRequest('get',`../solutionDetails/${page}/${page}.html`,null,()=>{})
            .then(res=>{
                this.setState({
                    content:ReactHtmlParser(res.data)
                })
            })
            .catch(err=>{
                console.log(err)
            });
    };
    render(){
        let {content} = this.state;
        return(
            <div className={prefix}>
                {content}
            </div>
        )
    }
}
export default HospitalDetails;
HospitalDetails.propTypes = {
    page:PropTypes.string.isRequired
}